<page-grid>
    <sf
        #sf
        mode="search"
        [schema]="searchSchema"
        autocomplete="off"
        [formData]="params"
        (formSubmit)="searchDataGet($event)"
        (formReset)="reSetDataGet(params)"
    />
    <div space-card>
        <button nz-button *aclIf="['admin', 'system:post:add']" [nzType]="'primary'" (click)="addPost()">
            <i nz-icon nzType="plus" nzTheme="outline"></i>新增
        </button>
        <button
            nz-button
            [disabled]="!singleCheckedItem"
            *aclIf="['admin', 'system:post:edit']"
            [nzType]="'primary'"
            (click)="editPost(singleCheckedItem)"
        >
            <i nz-icon nzType="edit" nzTheme="outline"></i>修改
        </button>
        <button
            nz-button
            [disabled]="!(multipleCheckedItems.length > 0)"
            *aclIf="['admin', 'system:post:remove']"
            [nzType]="'primary'"
            nzDanger
            (click)="delPostS(multipleCheckedItems)"
        >
            <i nz-icon nzType="delete" nzTheme="outline"></i>删除
        </button>
        <button nz-button *aclIf="['admin', 'system:post:export']"> <i nz-icon nzType="download" nzTheme="outline"></i>导出 </button>
    </div>
    <st
        #st
        [bordered]="bordered"
        [data]="url"
        [req]="reqReName"
        [res]="resReName"
        [ps]="ps"
        [columns]="columns"
        [scroll]="scroll"
        [size]="tableSize"
        [page]="pageSet"
        [widthMode]="widthMode"
        (change)="simpleTableCheck($event)"
    >
        <ng-template st-row="statusCustom" let-item let-index="index">
            <dict-tag [value]="item.status" dictKey="sys_normal_disable" />
        </ng-template>
    </st>
</page-grid>
